package com.sky.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@Data
@ApiModel("员工分页DTO对象")
public class EmployeePageQueryDTO implements Serializable {

    //员工姓名
    @ApiModelProperty("员工姓名")
    private String name;

    //页码
    @ApiModelProperty("分页页码")
    private int page =1;

    //每页显示记录数
    @ApiModelProperty("每页记录数")
    private int pageSize =10;

    public void check(){
        if (page<=0){
            page =1;
        }
        if(pageSize<0||pageSize>100){
            pageSize=10;
        }

    }
}
